home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / asg53.zip / READASG.DOC < prev    next >
Text File  |  1989-12-03  |  7KB  |  214 lines

  1. Documentation for Version 5.3 of ReadASG.TPU
  2.  
  3.   The procedures in this unit allow full screen editing of data entry. Up to
  4. 64 of the twelve AtSayGet (V 5.3) procedures can be joined on one "page" to 
  5. be "read" together, and up to 10 pages of ASG procedures can be active at a
  6. time.
  7.   The full screen editing commands will be familiar to WordStar/dBase/Side-
  8. Kick users. In fact, the ReadASG editor is more intuitive than dBase. For
  9. example dBase will just move to the previous field if a ^E or Up Arrow key
  10. is pressed, whereas ReadASG will move to the field above the current one --
  11. even if that field is not the previous field. In the following diagrams the
  12. fields are numbered in the order that they should be entered on the page 
  13. (left to right and top to bottom). This is also the order in which data will
  14. be entered if each field is filled or the ENTER or TAB key is pressed.
  15. Pressing the Shift Tab keys causes the entry screen to back up to the pre-
  16. vious field; In the diagram below Shift Tab would move from 6 to 5, 5 to 4,
  17. etc. The effect of the arrow keys is shown in the following two diagrams:
  18.  
  19.             UP ARROW or ^E                      DOWN ARROW or ^X
  20. ┌───────────────────────────────────┐ ┌───────────────────────────────────┐
  21. │    ┌─^G ─┐ ┌<─<─<─<─<─<─<─<─<┐    │ │                                   │
  22. │    v     ^ v                 ^    │ │                                   │
  23. │  [ field 1 ]         [ field 2 ]  │ │  [ field 1 ]         [ field 2 ]  │
  24. │          ^                   ^    │ │          v                   v    │
  25. │          ^                   ^    │ │          v                   v    │
  26. │          ^           [ field 3 ]  │ │          v           [ field 3 ]  │
  27. │          ^                   ^    │ │          v                   v    │
  28. │          ^                   ^    │ │          v                   v    │
  29. │  [ field 4 ]         [ field 5 ]  │ │  [ field 4 ]         [ field 5 ]  │
  30. │          ^                        │ │  ^       v                   v    │
  31. │          ^                        │ │  └─ ^G <─┘                   v    │
  32. │          └─[ field 6 ]            │ │            [ field 6 ]<─<─<─<┘    │
  33. │                                   │ │                    v              │
  34. │                                   │ │                    v              │
  35. │                                   │ │                 exit              │
  36. └───────────────────────────────────┘ └───────────────────────────────────┘
  37.  
  38.   The ReadASG unit interface follows:
  39.  
  40. {$F+,V-}
  41. UNIT ReadASG;
  42. INTERFACE
  43. USES
  44.  AtSayGet,  {from ASG53.ARC/ZIP}
  45.  CRT;
  46.  
  47. CONST
  48.  BadPage  = -8; { ASGExit code if ASGEntry page is not full }
  49.  FullPage = -9; { ASGExit code if ASGEntry page w/b over-full. See also the
  50.                   ASGExit codes described in the AtSayGet.DOC file. }
  51. TYPE
  52.  MaxFields    = 1..64;  { Number of ASG fields allowed per page. }
  53.  Pages        = 1..10;  { Each "field" on a page consumes 250 bytes of heap
  54.                           space. The page space is released on exit or under
  55.                           program control using the FreeASGHeapPage proc.
  56.                           If all 10 pages are used, each editing 64 different
  57.                           variables, 160000 bytes of the heap will be used.
  58.                           One page can be re-used to edit many different sets
  59.                           of data -- Multiple pages are only for convenience}
  60.  
  61.  
  62. {Procedures to create and dispose of HeapPages:}
  63.  
  64. PROCEDURE { Makes a page on the heap to store "Field" information. }
  65. MakeASGHeapPage(PageIndex   : Pages;         {1..10}
  66.                 NumOfFields : MaxFields );   {1..64}
  67.  
  68.  
  69. PROCEDURE { Frees the heap of an un-neaded edit page. }
  70. FreeASGHeapPage(PageIndex : Pages);          {1..10}
  71.  
  72.  
  73.  
  74. {Procedures to add an ASG procedure to a HeapPage:
  75.  
  76. NOTE -- Except for the additional 1st parameter - PageID - all of the
  77. following procedures follow the syntax of the corresponding AtSayGet
  78. procedures described in the AtSayGet.DOC file. The only other deviation is
  79. that the address of the variable being edited (not the variable itself) is
  80. the parameter.
  81. }
  82.  
  83. PROCEDURE AddASGB      { Add an AtSayGetBoolean procedure to the page. }
  84. (PageID    : Pages;
  85.  X         : Xrange;
  86.  Y         : Yrange;
  87.  Say       : FieldTxt;
  88.  GetBoolean: POINTER);
  89.  
  90.  
  91. PROCEDURE AddASGCP     { Add an AtSayGetCharPic procedure to the page. }
  92. (PageID    : Pages;
  93.  X         : Xrange;
  94.  Y         : Yrange;
  95.  Say       : FieldTxt;
  96.  GetChar   : POINTER;
  97.  Pic       : CHAR);
  98.  
  99.  
  100. PROCEDURE AddASGSL     { Add an AtSayGetStrLen procedure to the page }
  101. (PageID    : Pages;
  102.  X         : Xrange;
  103.  Y         : Yrange;
  104.  Say       : FieldTxt;
  105.  GetStr    : POINTER;
  106.  Len       : BYTE);
  107.  
  108.  
  109. PROCEDURE AddASGSP     { Add an AtSayGetStrPic procedure }
  110. (PageID    : Pages;
  111.  X         : Xrange;
  112.  Y         : Yrange;
  113.  Say       : FieldTxt;
  114.  GetStr    : POINTER;
  115.  Pic       : FieldTxt);
  116.  
  117.  
  118. PROCEDURE AddASGByte   { Add an AtSayGetByte procedure }
  119. (PageID    : Pages;
  120.  X         : Xrange;
  121.  Y         : Yrange;
  122.  Say       : FieldTxt;
  123.  GetByte   : POINTER;
  124.  Len       : MaxFL);
  125.  
  126.  
  127. PROCEDURE AddASGR      { Add an AtSayGetReal procedure }
  128. (PageID    : Pages;
  129.  X         : Xrange;
  130.  Y         : Yrange;
  131.  Say       : FieldTxt;
  132.  GetReal   : POINTER;
  133.  Len,DecPl : MaxFL);
  134.  
  135.  
  136. PROCEDURE AddASGI      { Add an AtSayGetInt procedure }
  137. (PageID    : Pages;
  138.  X         : Xrange;
  139.  Y         : Yrange;
  140.  Say       : FieldTxt;
  141.  GetInt    : POINTER;
  142.  Len       : MaxFL);
  143.  
  144.  
  145. PROCEDURE AddASGLI     { Add an AtSayGetLongInt procedure }
  146. (PageID    : Pages;
  147.  X         : Xrange;
  148.  Y         : Yrange;
  149.  Say       : FieldTxt;
  150.  GetLongInt: POINTER;
  151.  Len       : MaxFL);
  152.  
  153.  
  154. PROCEDURE AddASGW      { Add an AtSayGetWord procedure }
  155. (PageID    : Pages;
  156.  X         : Xrange;
  157.  Y         : Yrange;
  158.  Say       : FieldTxt;
  159.  GetWord   : POINTER;
  160.  Len       : MaxFL);
  161.  
  162.  
  163. PROCEDURE AddASGRR     { Add an AtSayGetRealRange procedure }
  164. (PageID    : Pages;
  165.  X         : Xrange;
  166.  Y         : Yrange;
  167.  Say       : FieldTxt;
  168.  GetReal   : POINTER;
  169.  Len,DecPl : MaxFL;
  170.  Min,Max   : REAL);
  171.  
  172.  
  173. PROCEDURE AddASGIR     { Add an AtSayGetIntRange procedure }
  174. (PageID    : Pages;
  175.  X         : Xrange;
  176.  Y         : Yrange;
  177.  Say       : FieldTxt;
  178.  GetInt    : POINTER;
  179.  Len       : MaxFL;
  180.  Min,Max   : INTEGER);
  181.  
  182.  
  183. PROCEDURE AddASGLIR    { Add an AtSayGetLongIntRange procedure }
  184. (PageID    : Pages;
  185.  X         : Xrange;
  186.  Y         : Yrange;
  187.  Say       : FieldTxt;
  188.  GetLongInt: POINTER;
  189.  Len       : MaxFL;
  190.  Min,Max   : LongInt);
  191.  
  192.  
  193. PROCEDURE AddASGWR     { Add an AtSayGetWordRange procedure }
  194. (PageID    : Pages;
  195.  X         : Xrange;
  196.  Y         : Yrange;
  197.  Say       : FieldTxt;
  198.  GetWord   : POINTER;
  199.  Len       : MaxFL;
  200.  Min,Max   : WORD);
  201.  
  202.  
  203.  
  204. {Procedure to activate FULL SCREEN EDITING:
  205.  
  206. After "Making" your entry page(s) and "Adding" a full list of ASG procedures
  207. to each, you can call the following procedure to manage each edit page. Once
  208. built, you can call ReadPage(#) to edit any number of records or sets of
  209. variables. To see how simple it is to use these procedures see ReadDemo.PAS
  210. }
  211.  
  212.  
  213. PROCEDURE ReadPage(PageID : Pages);
  214.